******************************************************
* Political Communication	  		      		   	 *
* Facebook Usage and Outgroup Intolerance in Myanmar *
* Oren Samet, Leonardo Arriola, Aila Matanock 	   	 *
* January 2024                            		     *
******************************************************

/******************************************
REPLICATION CODE & DATA OUTPUT

All analyses were conducted in Stata 16.1.

Data Note: Stata commands 'outreg2' and 'psmatch' may need to be downloaded. 
For questions, contact: osamet@berkeley.edu.

File Output: 
(1) main_table2.rtf [Article Table 2]
(2) main_table3.doc [Article Table 3]
(3) main_table4.doc [Article Table 4]
(4) main_figure1 [Article Figure 1]
(5) main_figure2 [Article Figure 2]

(6) figure_appendixb1 [Appendix Figure B1]
(7) table_appendixb1.doc [Appendix Table B1]
(8) table_appendixb2.doc [Appendix Table B2]
(9) table_appendixb3.doc [Appendix Table B3]
(10) table_appendixb4.doc [Appendix Table B4]
(11) table_appendixb5.doc [Appendix Table B5]
(12) table_appendixb6.doc [Appendix Table B6]
(13) table_appendixb7.doc [Appendix Table B7]
(14) table_appendixb8.doc [Appendix Table B8]
(15) table_appendixb9.doc [Appendix Table B9]
(16) table_appendixc1.doc [Appendix Table C1]
(17) table_appendixc2.doc [Appendix Table C2]
(18) table_appendixd1.doc [Appendix Table D1]
(19) table_appendixd2.doc [Appendix Table D2]
(20) table_appendixe1.doc [Appendix Table E1]
(21) table_appendixf1.doc [Appendix Table F1]
(22) table_appendixf2.doc [Appendix Table F2]

********************************************/

** Set working directory to load data **
cd ".../Samet etal PolComm Replication Repository"

** Load data **
use "Data Files/MMKAPsurvey_fb_PolComm.dta", replace

********************************************
* TABLE 2                                  *
* DV: DEMOGRAPHICS BY FACEBOOK USE   	   *
********************************************

eststo clear
estpost ttest a3_age woman urban bamar buddhist ed_high, by(facebook)

esttab using "Output Files/main_table2.rtf", replace ///
    cells("mu_1(fmt(3)) mu_2(fmt(3)) b(fmt(3)) p(fmt(3))") label ///
    title("Table 1: Demographic Means by Facebook Use") collabels("No Facebook" "Facebook" "Diff. Means" "P-Value (T-Test)") nomtitle nonumber noobs ///
	modelwidth(8)
	
********************************************
* TABLE 3                                  *
* DV: FACEBOOK USE AND TOLERANCE   		   *
********************************************

regress ethnic_tolerance_rescaled facebook i.state_region
outreg2 using "Output Files/main_table3.doc", replace ctitle(Model 1) dec(3) drop(i.state_region) label
regress ethnic_tolerance_rescaled facebook a3_age woman i.state_region
outreg2 using "Output Files/main_table3.doc", append ctitle(Model 2) dec(3) drop(i.state_region) label
regress ethnic_tolerance_rescaled facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/main_table3.doc", append ctitle(Model 3) dec(3) drop(i.state_region) label
regress religious_tolerance_rescaled facebook i.state_region
outreg2 using "Output Files/main_table3.doc", append ctitle(Model 1) dec(3) drop(i.state_region) label
regress religious_tolerance_rescaled facebook a3_age woman i.state_region
outreg2 using "Output Files/main_table3.doc", append ctitle(Model 2) dec(3) drop(i.state_region) label
regress religious_tolerance_rescaled facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/main_table3.doc", append ctitle(Model 3) dec(3) drop(i.state_region) label

********************************************
* TABLE 4                                  *
* DV: FREQUENCY OF USE AND TOLERANCE   	   *
********************************************

regress ethnic_tolerance_rescaled fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/main_table4.doc", replace ctitle(Ethnic Tolerance) dec(3) drop(i.state_region) label
regress religious_tolerance_rescaled fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/main_table4.doc", append ctitle(Religious Tolerance) dec(3) drop(i.state_region) label


***********************************************
* FIGURE 1	                                  *
* BAR CHARTS: TOLERANCE BY FACEBOOK USE		  *
***********************************************

** Note: Run each bar chart separately before combining; otherwise will return an error that "ethnic_tolerance_rescaled" is not found. **

** Bar Chart: Religious Tolerance by Facebook Use **
mean religious_tolerance_rescaled if facebook==0
mean religious_tolerance_rescaled if facebook==1

preserve
collapse (mean) mean_rel_tol=religious_tolerance_rescaled (sd) sd_rel_tol=religious_tolerance_rescaled (count) n=religious_tolerance_rescaled, by(facebook)
generate hi_rel_tol = mean_rel_tol + invttail(n-1,0.025)*(sd_rel_tol / sqrt(n))
generate low_rel_tol = mean_rel_tol - invttail(n-1,0.025)*(sd_rel_tol / sqrt(n))

twoway (bar mean_rel_tol facebook if facebook==0, bcolor(dimgray) barwidth(0.8)) ///
		(bar mean_rel_tol facebook if facebook==1, bcolor(gray) barwidth(0.8)) ///
		(rcap hi_rel_tol low_rel_tol facebook, lcolor(black)), ///
		legend(off) ///
		xla(0 "No Facebook" 1 "Facebook") ///
		ytitle("Religious Tolerance (mean)") ///
		xtitle("") ///
		yscale(range(-2,5)) ///
		subtitle(Religious Tolerance, ring(0) position(12)) ///
		ylabel(-2 "-2" -1 "-1" 0 "0" 1 "1" 2 "2" 3 "3" 4 "4" 5 "5", angle(0) nogrid) ///
		scheme(s1mono) ///
		name(reltol)
		

** Bar Chart: Ethnic Tolerance by Facebook Use **
use "Data Files/MMKAPsurvey_fb_PolComm.dta", replace
mean ethnic_tolerance_rescaled if facebook==0
mean ethnic_tolerance_rescaled if facebook==1

collapse (mean) mean_eth_tol=ethnic_tolerance_rescaled (sd) sd_eth_tol=ethnic_tolerance_rescaled (count) n=ethnic_tolerance_rescaled, by(facebook)
generate hi_eth_tol = mean_eth_tol + invttail(n-1,0.025)*(sd_eth_tol / sqrt(n))
generate low_eth_tol = mean_eth_tol - invttail(n-1,0.025)*(sd_eth_tol / sqrt(n))

twoway (bar mean_eth_tol facebook if facebook==0, bcolor(dimgray) barwidth(0.8)) ///
		(bar mean_eth_tol facebook if facebook==1, bcolor(gray) barwidth(0.8)) ///
		(rcap hi_eth_tol low_eth_tol facebook, lcolor(black)), ///
		legend(off) ///
		xla(0 "No Facebook" 1 "Facebook") ///
		ytitle("Ethnic Tolerance (mean)") ///
		xtitle("") ///
		yscale(range(-2,5)) ///
		subtitle(Ethnic Tolerance, ring(0) position(12)) ///
		ylabel(-2 "-2" -1 "-1" 0 "0" 1 "1" 2 "2" 3 "3" 4 "4" 5 "5", angle(0) nogrid) ///
		scheme(s1mono) ///
		name(ethtol)

** Bar Charts Combined **
graph combine ethtol reltol, col(2) saving("Output Files/main_figure1", replace)

graph drop ethtol
graph drop reltol

***********************************************
* FIGURE 2	                                  *
* COEFFICIENT PLOTS: FACEBOOK USE		  	  *
***********************************************

use "Data Files/MMKAPsurvey_fb_PolComm.dta", replace

* Ethnic Tolerance *
regress eth_work_rescaled facebook a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store eth_work
regress eth_live_rescaled facebook a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store eth_live
regress eth_friend_rescaled facebook a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store eth_friend
regress eth_marry_rescaled facebook a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store eth_marry

* Plot *
coefplot (eth_work, keep(facebook) label(Work Together)) (eth_live, keep(facebook) label(Live Near)) (eth_friend, keep(facebook) label(Socialize With)) (eth_marry, keep(facebook) label(Marry)), xline(0) title("Ethnic Tolerance") xscale(range(-0.4 0.4)) xlabel(-0.4 -0.2 0 0.2 0.4, valuelabel) coeflabels(facebook = " ") ytitle("Facebook", orientation(vertical)) name(ethtol_coef)

* Religious Tolerance *
regress rel_work_rescaled facebook a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store rel_work
regress rel_live_rescaled facebook a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store rel_live
regress rel_friend_rescaled facebook a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store rel_friend
regress rel_marry_rescaled facebook a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store rel_marry
regress rel_worship_rescaled facebook a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store rel_worship

* Plot *
coefplot (rel_work, keep(facebook) label(Work Together)) (rel_live, keep(facebook) label(Live Near)) (rel_friend, keep(facebook) label(Socialize With)) (rel_marry, keep(facebook) label(Marry)) (rel_worship, keep(facebook) label(Houses of Worship)), xline(0) title("Religious Tolerance") xscale(range(-0.4 0.4)) xlabel(-0.4 -0.2 0 0.2 0.4, valuelabel) coeflabels(facebook = " ") ytitle("Facebook", orientation(vertical)) name(reltol_coef)

graph combine ethtol_coef reltol_coef, col(2) saving("Output Files/main_figure2", replace)

graph drop ethtol_coef
graph drop reltol_coef

***********************************************
* APPENDIX FIG B1	                          *
* COEFFICIENT PLOTS: FACEBOOK FREQUENCY		  *
***********************************************

* Ethnic Tolerance *
regress eth_work_rescaled fb_freq a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store eth_work
regress eth_live_rescaled fb_freq a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store eth_live
regress eth_friend_rescaled fb_freq a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store eth_friend
regress eth_marry_rescaled fb_freq a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store eth_marry

* Plot *
coefplot (eth_work, keep(fb_freq) label(Work Together)) (eth_live, keep(fb_freq) label(Live Near)) (eth_friend, keep(fb_freq) label(Socialize With)) (eth_marry, keep(fb_freq) label(Marry)), xline(0) title("Ethnic Tolerance") xscale(range(-0.2 0.2)) xlabel(-0.2 -0.1 0 0.1 0.2, valuelabel) coeflabels(fb_freq = " ") ytitle("Facebook Frequency", orientation(vertical)) name(ethtol_freq)

* Religious Tolerance *
regress rel_work_rescaled fb_freq a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store rel_work
regress rel_live_rescaled fb_freq a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store rel_live
regress rel_friend_rescaled fb_freq a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store rel_friend
regress rel_marry_rescaled fb_freq a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store rel_marry
regress rel_worship_rescaled fb_freq a3_age buddhist woman bamar urban ed_1 ed_2 ed_3 ed_nf i.state_region
estimates store rel_worship

* Plot *
coefplot (rel_work, keep(fb_freq) label(Work Together)) (rel_live, keep(fb_freq) label(Live Near)) (rel_friend, keep(fb_freq) label(Socialize With)) (rel_marry, keep(fb_freq) label(Marry)) (rel_worship, keep(fb_freq) label(Houses of Worship)), xline(0) title("Religious Tolerance") xscale(range(-0.2 0.2)) xlabel(-0.2 -0.1 0 0.1 0.2, valuelabel) coeflabels(fb_freq = " ") ytitle("Facebook Frequency", orientation(vertical)) name(reltol_freq)

graph combine ethtol_freq reltol_freq, col(2) saving("Output Files/figure_appendixb1", replace)

graph drop ethtol_freq
graph drop reltol_freq


***********************************************
* APPENDIX B1                                 *
* DV: ETHNIC TOLERANCE - WORK TOGETHER	  	  *
***********************************************

regress eth_work_rescaled facebook i.state_region
outreg2 using "Output Files/table_appendixb1.doc", replace ctitle(Model 1) dec(3) drop(i.state_region) label
regress eth_work_rescaled facebook a3_age woman i.state_region
outreg2 using "Output Files/table_appendixb1.doc", append ctitle(Model 2) dec(3) drop(i.state_region) label
regress eth_work_rescaled facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb1.doc", append ctitle(Model 3) dec(3) drop(i.state_region) label
regress eth_work_rescaled fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb1.doc", append ctitle(Frequency) dec(3) drop(i.state_region) sortvar(facebook fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf) label


***********************************************
* APPENDIX B2                                 *
* DV: ETHNIC TOLERANCE - LIVE IN SAME AREA	  *
***********************************************

regress eth_live_rescaled facebook i.state_region
outreg2 using "Output Files/table_appendixb2.doc", replace ctitle(Model 1) dec(3) drop(i.state_region) label
regress eth_live_rescaled facebook a3_age woman i.state_region
outreg2 using "Output Files/table_appendixb2.doc", append ctitle(Model 2) dec(3) drop(i.state_region) label
regress eth_live_rescaled facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb2.doc", append ctitle(Model 3) dec(3) drop(i.state_region) label
regress eth_live_rescaled fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb2.doc", append ctitle(Frequency) dec(3) drop(i.state_region) sortvar(facebook fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf) label


***********************************************
* APPENDIX B3                                 *
* DV: ETHNIC TOLERANCE - SOCIALIZE			  *
***********************************************

regress eth_friend_rescaled facebook i.state_region
outreg2 using "Output Files/table_appendixb3.doc", replace ctitle(Model 1) dec(3) drop(i.state_region) label
regress eth_friend_rescaled facebook a3_age woman i.state_region
outreg2 using "Output Files/table_appendixb3.doc", append ctitle(Model 2) dec(3) drop(i.state_region) label
regress eth_friend_rescaled facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb3.doc", append ctitle(Model 3) dec(3) drop(i.state_region) label
regress eth_friend_rescaled fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb3.doc", append ctitle(Frequency) dec(3) drop(i.state_region) sortvar(facebook fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf) label


***********************************************
* APPENDIX B4                                 *
* DV: ETHNIC TOLERANCE - MARRY				  *
***********************************************

regress eth_marry_rescaled facebook i.state_region
outreg2 using "Output Files/table_appendixb4.doc", replace ctitle(Model 1) dec(3) drop(i.state_region) label
regress eth_marry_rescaled facebook a3_age woman i.state_region
outreg2 using "Output Files/table_appendixb4.doc", append ctitle(Model 2) dec(3) drop(i.state_region) label
regress eth_marry_rescaled facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb4.doc", append ctitle(Model 3) dec(3) drop(i.state_region) label
regress eth_marry_rescaled fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb4.doc", append ctitle(Frequency) dec(3) drop(i.state_region) sortvar(facebook fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf) label


***********************************************
* APPENDIX B5                                 *
* DV: RELIGIOUS TOLERANCE - WORK TOGETHER	  *
***********************************************

regress rel_work_rescaled facebook i.state_region
outreg2 using "Output Files/table_appendixb5.doc", replace ctitle(Model 1) dec(3) drop(i.state_region) label
regress rel_work_rescaled facebook a3_age woman i.state_region
outreg2 using "Output Files/table_appendixb5.doc", append ctitle(Model 2) dec(3) drop(i.state_region) label
regress rel_work_rescaled facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb5.doc", append ctitle(Model 3) dec(3) drop(i.state_region) label
regress rel_work_rescaled fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb5.doc", append ctitle(Frequency) dec(3) drop(i.state_region) sortvar(facebook fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf) label


***********************************************
* APPENDIX B6                                 *
* DV: RELIGIOUS TOLERANCE - LIVE IN SAME AREA *
***********************************************

regress rel_live_rescaled facebook i.state_region
outreg2 using "Output Files/table_appendixb6.doc", replace ctitle(Model 1) dec(3) drop(i.state_region) label
regress rel_live_rescaled facebook a3_age woman i.state_region
outreg2 using "Output Files/table_appendixb6.doc", append ctitle(Model 2) dec(3) drop(i.state_region) label
regress rel_live_rescaled facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb6.doc", append ctitle(Model 3) dec(3) drop(i.state_region) label
regress rel_live_rescaled fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb6.doc", append ctitle(Frequency) dec(3) drop(i.state_region) sortvar(facebook fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf) label


***********************************************
* APPENDIX B7                                 *
* DV: RELIGIOUS TOLERANCE - SOCIALIZE		  *
***********************************************

regress rel_friend_rescaled facebook i.state_region
outreg2 using "Output Files/table_appendixb7.doc", replace ctitle(Model 1) dec(3) drop(i.state_region) label
regress rel_friend_rescaled facebook a3_age woman i.state_region
outreg2 using "Output Files/table_appendixb7.doc", append ctitle(Model 2) dec(3) drop(i.state_region) label
regress rel_friend_rescaled facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb7.doc", append ctitle(Model 3) dec(3) drop(i.state_region) label
regress rel_friend_rescaled fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb7.doc", append ctitle(Frequency) dec(3) drop(i.state_region) sortvar(facebook fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf) label


***********************************************
* APPENDIX B8                                 *
* DV: RELIGIOUS TOLERANCE - MARRY			  *
***********************************************

regress rel_marry_rescaled facebook i.state_region
outreg2 using "Output Files/table_appendixb8.doc", replace ctitle(Model 1) dec(3) drop(i.state_region) label
regress rel_marry_rescaled facebook a3_age woman i.state_region
outreg2 using "Output Files/table_appendixb8.doc", append ctitle(Model 2) dec(3) drop(i.state_region) label
regress rel_marry_rescaled facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb8.doc", append ctitle(Model 3) dec(3) drop(i.state_region) label
regress rel_marry_rescaled fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb8.doc", append ctitle(Frequency) dec(3) drop(i.state_region) sortvar(facebook fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf) label


***********************************************
* APPENDIX B9                                 *
* DV: RELIGIOUS TOLERANCE - HOUSES OF WORSHIP *
***********************************************

regress rel_worship_rescaled facebook i.state_region
outreg2 using "Output Files/table_appendixb9.doc", replace ctitle(Model 1) dec(3) drop(i.state_region) label
regress rel_worship_rescaled facebook a3_age woman i.state_region
outreg2 using "Output Files/table_appendixb9.doc", append ctitle(Model 2) dec(3) drop(i.state_region) label
regress rel_worship_rescaled facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb9.doc", append ctitle(Model 3) dec(3) drop(i.state_region) label
regress rel_worship_rescaled fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region
outreg2 using "Output Files/table_appendixb9.doc", append ctitle(Frequency) dec(3) drop(i.state_region) sortvar(facebook fb_freq a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf) label


***********************************************
* APPENDIX C1                                 *
* DV: ETHNIC TOLERANCE (+ ENUMERATOR INFO)	  *
***********************************************

regress ethnic_tolerance_rescaled facebook enum_match i.state_region
outreg2 using "Output Files/table_appendixc1.doc", replace ctitle(Model 1) dec(3) drop(i.state_region) label
regress ethnic_tolerance_rescaled facebook a3_age woman enum_match i.state_region
outreg2 using "Output Files/table_appendixc1.doc", append ctitle(Model 2) dec(3) drop(i.state_region) label
regress ethnic_tolerance_rescaled facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf enum_match i.state_region
outreg2 using "Output Files/table_appendixc1.doc", append ctitle(Model 3) dec(3) drop(i.state_region) label

***********************************************
* APPENDIX C2                                 *
* DV: RELIGIOUS TOLERANCE (+ ENUMERATOR INFO) *
***********************************************

regress religious_tolerance_rescaled facebook enum_match i.state_region
outreg2 using "Output Files/table_appendixc2.doc", replace ctitle(Model 1) dec(3) drop(i.state_region) label
regress religious_tolerance_rescaled facebook a3_age woman enum_match i.state_region
outreg2 using "Output Files/table_appendixc2.doc", append ctitle(Model 2) dec(3) drop(i.state_region) label
regress religious_tolerance_rescaled facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf enum_match i.state_region
outreg2 using "Output Files/table_appendixc2.doc", append ctitle(Model 3) dec(3) drop(i.state_region) label


***********************************************
* APPENDIX D1                                 *
* DV: ETHNIC TOLERANCE (+ ETHNIC ATTACHMENT)  *
***********************************************

regress ethnic_tolerance_rescaled facebook revf1_ethnic_attach i.state_region
outreg2 using "Output Files/table_appendixd1.doc", replace ctitle(Model 1) dec(3) drop(i.state_region) label
regress ethnic_tolerance_rescaled facebook a3_age woman revf1_ethnic_attach i.state_region
outreg2 using "Output Files/table_appendixd1.doc", append ctitle(Model 2) dec(3) drop(i.state_region) label
regress ethnic_tolerance_rescaled facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf revf1_ethnic_attach i.state_region
outreg2 using "Output Files/table_appendixd1.doc", append ctitle(Model 3) dec(3) drop(i.state_region) label

********************************************************
* APPENDIX D2                                 		   *
* DV: RELIGIOUS TOLERANCE (+ RELIGIOUS PARTICIPATION)  *
********************************************************

regress religious_tolerance_rescaled facebook c5_religious i.state_region
outreg2 using "Output Files/table_appendixd2.doc", replace ctitle(Model 1) dec(3) drop(i.state_region) label
regress religious_tolerance_rescaled facebook a3_age woman c5_religious i.state_region
outreg2 using "Output Files/table_appendixd2.doc", append ctitle(Model 2) dec(3) drop(i.state_region) label
regress religious_tolerance_rescaled facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf c5_religious i.state_region
outreg2 using "Output Files/table_appendixd2.doc", append ctitle(Model 3) dec(3) drop(i.state_region) label


***********************************************
* APPENDIX E1                                 *
* DV: TOLERANCE, UNDER 45			  		  *
***********************************************

regress ethnic_tolerance_rescaled facebook woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region if age2 == 0
outreg2 using "Output Files/table_appendixe1.doc", replace ctitle(Ethnic Tolerance) dec(3) drop(i.state_region) label
regress religious_tolerance_rescaled facebook woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region if age2 == 0
outreg2 using "Output Files/table_appendixe1.doc", append ctitle(Religious Tolerance) dec(3) drop(i.state_region) label
regress rel_worship_rescaled facebook woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region if age2 == 0
outreg2 using "Output Files/table_appendixe1.doc", append ctitle(Houses of Worship) dec(3) drop(i.state_region) label
regress ethnic_tolerance_rescaled facebook woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region if age2 == 1
outreg2 using "Output Files/table_appendixe1.doc", append ctitle(Ethnic Tolerance) dec(3) drop(i.state_region) label
regress religious_tolerance_rescaled facebook woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region if age2 == 1
outreg2 using "Output Files/table_appendixe1.doc", append ctitle(Religious Tolerance) dec(3) drop(i.state_region) label
regress rel_worship_rescaled facebook woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region if age2 == 1
outreg2 using "Output Files/table_appendixe1.doc", append ctitle(Houses of Worship) dec(3) drop(i.state_region) label


***********************************************
* APPENDIX F1                                 *
* MATCHING ANALYSIS: ETHNIC TOLERANCE		  *
***********************************************

asdoc teffects psmatch (ethnic_tolerance_rescaled) (facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region), replace save(Output Files/table_appendixf1.doc)


***********************************************
* APPENDIX F2                                 *
* MATCHING ANALYSIS: RELIGIOUS TOLERANCE	  *
***********************************************

asdoc teffects psmatch (religious_tolerance_rescaled) (facebook a3_age woman urban bamar buddhist ed_1 ed_2 ed_3 ed_nf i.state_region), replace save(Output Files/table_appendixf2.doc)


